c58b7ae1b40e7729ff961435a8b7a08ab44d3e39,msgcntr/messageforums-component-shared/src/java/org/sakaiproject/component/app/messageforums/ui/UIPermissionsManagerImpl.java,UIPermissionsManagerImpl,isDeleteAny,#DiscussionTopic#DiscussionForum#,645
Before Change
typeManager.getDiscussionForumType());
if (messagePermission == null || messagePermission.getDeleteAny() == null
|| messagePermission.getDeleteAny() == Boolean.FALSE)
{
if (LOG.isDebugEnabled())
{
LOG.debug("Role :" + getCurrentUserRole()
+ "is not allowed to delete any messages for given topic " + topic);
}
return false;
}
if (topic.getLocked() == null || topic.getLocked() == Boolean.TRUE)
{
LOG.debug("This topic is locked " + topic);
return false;
}
if (topic.getDraft() == null || topic.getDraft() == Boolean.TRUE)
{
LOG.debug("This topic is at draft stage " + topic);
}
if (messagePermission.getDeleteAny() == Boolean.TRUE
&& forum.getDraft().equals(Boolean.FALSE)
&& forum.getLocked().equals(Boolean.FALSE)
&& topic.getDraft() == Boolean.FALSE
&& topic.getLocked() == Boolean.FALSE)
{
return true;
}
After Change
typeManager.getDiscussionForumType());
if (messagePermission == null || messagePermission.getDeleteAny() == null
|| messagePermission.getDeleteAny().equals(Boolean.FALSE))
{
if (LOG.isDebugEnabled())
{
LOG.debug("Role :" + getCurrentUserRole()
+ "is not allowed to delete any messages for given topic " + topic);
}
return false;
}
if (topic.getLocked() == null || topic.getLocked().equals(Boolean.TRUE))
{
LOG.debug("This topic is locked " + topic);
return false;
}
if (topic.getDraft() == null || topic.getDraft().equals(Boolean.TRUE))
{
LOG.debug("This topic is at draft stage " + topic);
}
if (messagePermission.getDeleteAny().equals(Boolean.TRUE)
&& forum.getDraft().equals(Boolean.FALSE)
&& forum.getLocked().equals(Boolean.FALSE)
&& topic.getDraft().equals(Boolean.FALSE)
&& topic.getLocked().equals(Boolean.FALSE))
{
return true;
}